Apple II
Sample Code Notes
_____________________________________________________________________________
                                                  Developer Technical Support


#2:    C.Shell

Version:    1.0                                                September 1988

APW Components:    Shell.C                        18 Aug 88
                   Shell                          30 Aug 88

MPW Components:    Shell.C                        01 Sep 88
                   Makefile                       17 Jun 88

Like the Shell load file created from Shell.Aii, this C-produced version of 
Shell performs a minimal set of tasks fundamental to virtually any Apple IIGS 
desktop application, including displaying an empty desktop with a menu bar and 
basic recommended menu options (with a few variations to distinguish it from 
the assembly-language version), generating an About box, and supporting both 
mouse-selected and keyboard-selected Quit functions.
_____________________________________________________________________________

The source code in Shell.C demonstrates standard desktop data constructs in C, 
how to load and start tools in correct sequence, how to code a main event 
loop, how to dispatch, and how to shutdown an application and tools in 
sequence in C.  Error handling is included, but the Edit menu is not enabled 
for desk accessories in this version.

For learning purposes, Shell.C is, for the most part, a direct translation of 
the 65816 assembly language Shell.Aii source code, so it is not optimized for 
C.  Shell.C can be used as a template for your Apple IIGS applications in C.

Use APW 1.0 and Apple IIGS System Disk 3.2 or later to execute the Shell file 
included with the APW-compatible source code files.  To create a load file 
from APW C files, issue the following command:  CMPL Shell.C Keep=Shell.

MPW IIGS users need MPW 2.02, MPW IIGS Tools 1.0, and MPW IIGS C.  The program 
name needed by the MPW Build menu's Build option is C.Shell.


